package com.jshoperxms.controller.utils.enums;

/**
 * Created by sdywcd on 16/11/14.
 * Des:广告枚举
 */
public class GoodsEnums {


    /**
     * 商品分类等级枚举
     */
    public enum GoodsCategoryGrade{
        NAV("一级","0"),LTYPE("二级","1"),STYPE("三级","2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private GoodsCategoryGrade(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (GoodsCategoryGrade f : GoodsCategoryGrade.values()) {
                if (f.getState().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }
    }


    /**
     * 评论审核
     *
     * @author Seth.Wang
     * @Package com.jshoperxms.action.utils.enums
     * @ClassName: ReplyorComment
     * @date 2015年11月19日 下午6:16:14
     */
    public enum CommentReviewed {

        PASS("通过", "1"), NO("未审核", "0"),REJECT("驳回","2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private CommentReviewed(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (CommentReviewed f : CommentReviewed.values()) {
                if (f.getState().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }
    }



    /**
     * 评论类型
     *
     * @author Seth.Wang
     * @Package com.jshoperxms.action.utils.enums
     * @ClassName: ReplyorComment
     * @date 2015年11月19日 下午6:16:14
     */
    public enum ReplyorComment {

        COMMENT("商品的评论", "1"), REPLY("回复的评论", "2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private ReplyorComment(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (ReplyorComment f : ReplyorComment.values()) {
                if (f.getState().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }
    }


    /**
     * 商品评论类型
     *
     * @ClassName: GoodsCommentType
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年3月6日 下午10:42:19
     *
     */
    public enum GoodsCommentType {
        VIRTULADD("虚拟评论", "1"), NOTVIRTULADD("会员评论", "2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private GoodsCommentType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (GoodsCommentType d : GoodsCommentType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }


    /**
     * 商品评论回复类型
     *
     * @ClassName: GoodsCommentReplyType
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年3月6日 下午10:42:19
     *
     */
    public enum GoodsCommentReplyType {
        MEMBERREPLY("来自会员的评论", "1"), OFFICIALRELPY("来自官方的回复", "2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private GoodsCommentReplyType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (GoodsCommentReplyType d : GoodsCommentReplyType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }


    /**
     * 属性类型
     * @ClassName: AttrType
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年10月9日 下午2:40:28
     *
     */
    public enum AttrType {
        TEXT("文本", "1");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }


        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private AttrType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (AttrType a : AttrType.values()) {
                if (a.getState().equals(state)) {
                    return a.getName();
                }
            }
            return "";
        }
    }



    /**
     * 属性是否支持搜索
     * @ClassName: AttrIssearch
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年10月9日 下午2:40:28
     *
     */
    public enum AttrIsSearch {
        SUPPORT("支持", "1"),UNSUPPORT("未支持","0");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }


        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private AttrIsSearch(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (AttrIsSearch a : AttrIsSearch.values()) {
                if (a.getState().equals(state)) {
                    return a.getName();
                }
            }
            return "";
        }
    }


    /**
     * 属性是否支持关联搜索
     * @ClassName: AttrIssearch
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年10月9日 下午2:40:28
     *
     */
    public enum AttrIsSameToLink {
        SUPPORT("支持", "1"),UNSUPPORT("未支持","0");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }


        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private AttrIsSameToLink(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (AttrIsSameToLink a : AttrIsSameToLink.values()) {
                if (a.getState().equals(state)) {
                    return a.getName();
                }
            }
            return "";
        }
    }



}
